<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<title>Log列表</title>

<!-- Bootstrap Core CSS -->
<link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet">
<!-- 自定义CSS -->
<link href="<%=basePath%>css/main.css" rel="stylesheet">
<!-- jquery jS -->
<script src="<%=basePath%>js/jquery.min.js"></script>

<!-- jquery.validate.min.js-->
<script src="<%=basePath%>js/validate/jquery.validate.min.js"></script>
<!-- messages_zh.js-->
<script src="<%=basePath%>js/validate/messages_zh.js"></script>
 
 
<!-- 自定义jS -->
<script src="<%=basePath%>js/myjs.js"></script>
<!-- Bootstrap Core jS -->
<script src="<%=basePath%>js/bootstrap.min.js"></script>
</head>

<body>

	<!-- 搜索页面 -->
<div id="page-wrapper">
	<div class="row">
		<div class="col-lg-12">
			<h1 class="page-header">日志管理</h1>
		</div>
	</div>
	<div class="panel panel-default">
		<div class="panel-body">
			<form class="form-inline"  action="/query" method="post">
				<!-- 当前页数隐藏字段 -->
				<div class="form-group">
					 <input type="hidden" class="form-control" id="currentPage"
					  value="${searchLog.currentPage }" name="currentPage">
				</div>
				
				<div class="form-group">
					<label for="logInfo">日志详情</label> 
					<input type="text" class="form-control" id="logInfo"
					 value="${searchLog.logInfo }" name="logInfo">
				</div>
				
				<div class="form-group">
					<label for="startLogTime">起始时间</label>
					<input type="text" class="form-control" id="startLogTime" 
					value="${searchLog.startLogTime }" name="startLogTime" placeholder="2015-05-28">
					
				</div>
				
				<div class="form-group">
					<label for="endLogTime">截止时间</label>
					 <input type="text" class="form-control" id="endLogTime"
					  value="${searchLog.endLogTime }" name="endLogTime" placeholder="2015-05-28">
				</div>
				
				
				<div class="form-group">
					<label for="className">类名</label> 
					<input type="text"
						class="form-control" id="className" 
						value="${searchLog.className }" name="className">
				</div>
				
				<div class="form-group">
					<label for="className">日志级别</label>
					<select class="form-control" id="logLeval" name="logLeval">
						<option value="2" <c:if test="${searchLog.logLeval == 2}"> selected</c:if>>INFO</option>
						<option value="1"<c:if test="${searchLog.logLeval == 1}"> selected</c:if>>ERROR</option>
						<option value="0"<c:if test="${searchLog.logLeval == 0}"> selected</c:if>>DEBUG</option>
					</select>
				</div>
				<button id ="subBtn" type="submit" class="btn btn-info">查询</button>
				<button  type="reset" class="btn btn-danger">清除</button>
			</form>
		</div>
	</div>

</div>
	<div class="butcon">
		<div class="addLog fr">
			<!-- 插入日志按钮 -->
			<button   class="btn btn-warning">插入日志</button>
		</div>
	</div>
	
	<!-- 日志信息展示 -->
	<div class="row">
		<div class="col-lg-12">
			<div class="panel panel-default">
				<div class="panel-heading">Log信息列表</div>
				<!-- /.panel-heading -->
				<table class="table table-bordered table-striped">
					<thead>
						<tr>
							<th>日志ID</th>
							<th>日志时间</th>
							<th>线程名</th>
							<th>日志级别</th>
							<th>类名</th>
							<th>日志详情</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${page.records}" var="row">
							<tr>
								<td>${row.logId}</td>
								<td>${row.logTimeStr}</td>
								<td>${row.threadName}</td>
								<td>${row.logLeval}</td>
								<td>${row.className}</td>
								<td>${row.logInfo}</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
			</div>
		</div>
	</div>
	<!-- 日志信息分页 -->
	<div class="mycss">
		<ul>
			<c:if test="${page.pages >0 }">
			<c:forEach begin="1" end="${page.pages}" var="i">
				<li class="fl navA" >${i}</li>
			</c:forEach>
			</c:if>
		</ul>

	</div>
</body>
</html>